<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%@ include file="/commons/pages/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base target="_self" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>选择员工</title>
<style type="text/css">
body {
	background:#ffffff;
}
body, table, td, tr, th {
	font-family:"宋体", arial;
	font-size:12px;
	color:#000;
	line-height:20px;
}
img {
	vertical-align:middle;
	border:0
}
.btnImgBg {
	width:52px;
	height:18px;
	line-height:18px;
	background:url(${ctx}/css/images/selectButtonBg.jpg) no-repeat;
	text-align:center;
	border:none;
}
.inputText {
	border:1px solid #ccc;
	height:16px;
	line-height:16px;
	text-align:center;
}
table.TabTitle {
	border:1px solid #ccc;
	border-bottom:none;
	border-left:none;
}
table.TabTitle td {
	border-bottom:1px solid #ccc;
	border-left:1px solid #ccc;
	border-collapse:collapse;
	background:#F1F7FC;
	padding:6px 6px;
}
table.Tab {
	border:none;
}
table.Tab td {
	border-collapse:collapse;
	padding:5px 6px;
}
table.Tab td.next {
	background:#DBE9F7;
}
table.Tab td.page {
	text-align:right;
	background:#fff;
	padding-right:20px;
}
tr.alteven td {
	background: #ecf6fc;
}
tr.altodd td {
	background: #DBE9F7;
}
tr.over td {
	background: #BDD3E8;
}
table {
	table-layout: fixed;
}
</style>
</head>
<body style="margin: 5px;">
<div align="center">
  <html-el:form action="/manager/StaffWord.do">
    <html-el:hidden property="method" value="chooseUser" />
    <html-el:hidden property="mod_id" />
    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="TabTitle">
      <tr>
        <td width="10%" align="right" nowrap="nowrap">员工姓名</td>
        <td align="left" width="35%"><html-el:text property="user_name_like" style="border:1px solid #ccc;height:16px;line-height:16px;width:90%" /></td>
        <td width="10%" align="right" nowrap="nowrap">所属部门</td>
        <td align="left" width="35%"><html-el:select property="dept_id" style="width: 90%">
            <html-el:option value="">请选择...</html-el:option>
            <c:forEach var="cur" items="${deptInfoList}" varStatus="vs">
              <html-el:option value="${cur.dept_id}">${cur.dept_name}</html-el:option>
            </c:forEach>
          </html-el:select></td>
        <td width="10%"><input name="submit" type="submit" class="btnImgBg" value="查 询" style="cursor: pointer;" /></td>
      </tr>
    </table>
  </html-el:form>
  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" class="Tab">
    <tr>
      <c:forEach var="cur" items="${userInfoList}" varStatus="vs1">
        <td width="20%" title="" nowrap="nowrap"><input type="hidden" id="user_${cur.user_id}" name="user_id" value="${cur.user_id},${cur.user_name}" />
          ${cur.user_name}</td>
        <td width="10%"><input name="button" type="button" class="btnImgBg" style="cursor:pointer" id="button" value="选 择" onclick="window.returnValue=$('#user_${cur.user_id}').val();window.close();" />
        </td>
        <c:if test="${vs1.count mod 3 eq 0}">
          <c:out value="</tr>" escapeXml="false" />
          <c:out value="<tr>" escapeXml="false" />
        </c:if>
      </c:forEach>
      <c:if test="${fn:length(userInfoList) mod 3 != 0 && fn:length(userInfoList) > 0}">
        <c:forEach begin="0" end="${2 - fn:length(userInfoList) mod 3}">
        	<td colspan="2" nowrap="nowrap">&nbsp;</td>
        </c:forEach>
      </c:if>
    </tr>
  </table>
  <form id="bottomPageForm" name="bottomPageForm" method="post" action="StaffWord.do">
    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td height="40" align="center"><script type="text/javascript" src="${ctx}/commons/scripts/pager.js">;</script>
          <script type="text/javascript">
            var pager = new Pager(document.bottomPageForm, ${hf.map.pager.recordCount}, ${hf.map.pager.pageSize}, ${hf.map.pager.currentPage});
            pager.addHiddenInputs("method", "chooseUser");
            pager.addHiddenInputs("user_name_like", "${fn:escapeXml(hf.map.user_name_like)}");
            pager.addHiddenInputs("dept_id", "${hf.map.dept_id}");
            document.write(pager.toString());
            </script></td>
      </tr>
    </table>
  </form>
</div>
<script type="text/javascript" src="${ctx}/commons/scripts/jquery.js"></script>
<script type="text/javascript">//<![CDATA[
$(document).ready(function(){
	$(".Tab tr").mouseover(function(){  
		$(this).addClass("over");
	}).mouseout(function(){
		$(this).removeClass("over");
	})
	$(".Tab tr:even").addClass("alteven");
	$(".Tab tr:odd").addClass("altodd");
})
//]]></script>
</body>
</html>
